import { StrictMode } from "react";
import { createRoot } from "react-dom/client";

import { RouterProvider, AccessProvider, ProviderModel } from "qps";
import { IntlProvider } from "react-intl";

const Main = () => {
  return (
    <ProviderModel>
      <AccessProvider permissions={{ "a.c.d": true }}>
        <IntlProvider
          locale="en"
          messages={{
            "{test1}": "{test1}",
            _vite: "hello world!",
            "{name}": "{name}",
          }}
          defaultLocale="en"
        >
          <RouterProvider />
        </IntlProvider>
      </AccessProvider>
    </ProviderModel>
  );
};

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <Main />
  </StrictMode>
);
